using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class BoundaryConditionSetting_BasePanel : MonoBehaviour
{
    public ToggleGroup psc_ToggleGroup; //粒子与物面碰撞模型toggleGroup
    public Toggle[] psc_toggles;
    [SerializeField] private DrotReflectionConditionsSettingsPanel dfcsPanel;
    // Start is called before the first frame update
    void Start()
    {
        InitPSCToggleGroup();
    }

    private void InitPSCToggleGroup()
    {
        for (int i = 0; i < psc_toggles.Length; i++)
        {
            Toggle toggle = psc_toggles[i];
            toggle.onValueChanged.AddListener((bool value)=>OnPSCToggleValueChange(toggle));
        }
    }
    void OnPSCToggleValueChange(Toggle t)
    {
        if(t.isOn)
        {
            dfcsPanel.gameObject.SetActive(t.name == "DrotReflectionToggle_0");
        }
    }
}
